home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / computer / casio_st / prog_fx / oisac2 / l_5635.txt < prev    next >
Text File  |  1994-03-01  |  824b  |  20 lines

  1. 5 ONERRORGOTO900
  2. 10 MODE8:DIM:ERASEa,a$:DIMa(2),a$(2):a$(0)="r:inside":a$(1)="R:outside":a$(2)="l:side"
  3. 20 ANGLE0:n=0:c$=CHR$(5)
  4. 30 CLS:PRINT"Area (polygon)";TAB(0);"1:n,rA   2:n,RA   3:n,lA";
  5. 31 f=ASC(INPUT$(1,@))-48:IFf<1 ORf>3 THEN31
  6. 32 m$="Polygon  "
  7. 35 s$="n:number":z=n:GOSUB500:n=z:IFn<3 ORn>=1e7 ORFRACn<>0 THEN35
  8. 36 m$=m$+"(n="+MID$(STR$(n),2)+")  "
  9. 37 s$=a$(f-1):z=a(f-1):GOSUB500:a(f-1)=z
  10. 40 ONf GOTO41,42,43
  11. 41 s=n*a(0)^2*TAN(180/n):GOTO50
  12. 42 s=n*a(1)^2*SIN(360/n)/2:GOTO50
  13. 43 s=n*a(2)^2/TAN(180/n)/4
  14. 50 LOCATE0,1:PRINTc$;"Area =";ABSs;:z$=INPUT$(1,@):GOTO30
  15. 500 CLS:PRINTm$;s$;
  16. 510 LOCATE0,1:PRINTc$;LEFT$(s$,1);"=";z;"?";:INPUT@42;z:LOCATE0,0:IFz<0 THEN510 ELSERETURN
  17. 900 IFERR=1 THENCLS:ONERRORGOTO0
  18. 910 IFERL=510 THENRESUME510
  19. 920 LOCATE0,1:PRINTc$;"not found";:z$=INPUT$(1,@):RESUME30
  20.